package cn.edu.lsu.integratedsurvey.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 学生表
 * @Date 2024-05-01 10:13:41
 * @author Jasmine-drs
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("student")
@ApiModel(value="Student对象", description="学生表")
public class Student implements Serializable {

    @NotNull(message="[]不能为空")
    @ApiModelProperty("id索引")
    private Integer id;

    @NotBlank(message="[姓名]不能为空")
    @Size(max= 20,message="编码长度不能超过20")
    @ApiModelProperty("姓名")
    private String name;

    @NotBlank(message="[学号]不能为空")
    @Size(max= 11,message="编码长度不能超过11")
    @ApiModelProperty("学号")
    private String studentNumber;

    @Size(max= 255,message="编码长度不能超过255")
    @ApiModelProperty("班级")
    private String grade;

    @Size(max= 255,message="编码长度不能超过255")
    @ApiModelProperty("专业")
    private String profession;

    @NotNull(message="[德育]不能为空")
    @ApiModelProperty("德育")
    private Double moral;

    @NotNull(message="[智育]不能为空")
    @ApiModelProperty("智育")
    private Double intellectual;

    @NotNull(message="[体育]不能为空")
    @ApiModelProperty("体育")
    private Double physical;

    @NotNull(message="[美育]不能为空")
    @ApiModelProperty("美育")
    private Double aesthetic;

    @NotNull(message="[劳动教育]不能为空")
    @ApiModelProperty("劳动教育")
    private Double labor;

    @NotNull(message="[创新创业能力]不能为空")
    @ApiModelProperty("创新创业能力")
    private Double innovation;

    @NotNull(message="[突出贡献]不能为空")
    @ApiModelProperty("突出贡献")
    private Double outstanding;

    @NotNull(message="[操作员id]不能为空")
    @ApiModelProperty("操作员id")
    private Integer operatorId;

    @NotNull(message="[逻辑删除，0删除，1正常]不能为空")
    @ApiModelProperty("逻辑删除，0删除，1正常")
    @TableLogic
    private Integer status;

    @NotNull(message="[创建时间]不能为空")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @NotNull(message="[更新时间]不能为空")
    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
